Skip to content

🌱 Add BootstrapFailedMachineError error #10360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mcbenjemaa
Copy link
Member

@mcbenjemaa mcbenjemaa commented Apr 2, 2024

What this PR does / why we need it:

In some infra providers, we need more configuration to provision a cluster.
For example, cloud-init config and control plane endpoint.

Since there are no validations for those configs, the Bootstrap (cloud-init) may fail due to misconfiguration, and we need to figure out why.

Having a new machine error reason will give clear idea what's happening to users

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/area machine

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign enxebre for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 2, 2024
@mcbenjemaa
Copy link
Member Author

/area machine

@k8s-ci-robot k8s-ci-robot added area/machine Issues or PRs related to machine lifecycle management and removed do-not-merge/needs-area PR is missing an area label labels Apr 2, 2024
@mcbenjemaa
Copy link
Member Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 2, 2024
@enxebre
Copy link
Member

enxebre commented May 31, 2024

@mcbenjemaa this would be very useful. These kind of errors though might happen after the iaas considers an instance started, in which case they are not surfaced/exposed in any immediate consumable way. Can you articulate an example of how such a failure would be detected and bubble up here?

To make sure we approach this holistically and come up with the most valuable approach, we might want to start by writing down some failure scenarios and how they would be surfaced.
FWIW see previous related efforts #2554

@mcbenjemaa
Copy link
Member Author

I'm Using CAPI provider for Proxmox,
And I need a way of detecting if the bootstrap fails.

With Proxmox im calling the API to check the status of cloud-init.

And based on that, will mark a machine as Bootstrap Failed,
So the user knows that it's failing due to the bootstrap data.

@enxebre
Copy link
Member

enxebre commented Jun 3, 2024

I'd expect such kind of failures to be captured in a condition, that then we signal as permanent failure.
See previous efforts #6218

At the lack of a mechanism for the above, should this failure be captured in the ProxmoxMachine Ready condition? that would then be bubbled up to the Machine?

@mcbenjemaa
Copy link
Member Author

In my case,
If machine failed to provision, its considered as a provision failure.

I don't know whether it's good to have it in conditions.

But in case of control planes, the cluster should be marked failed i guess.

@mcbenjemaa
Copy link
Member Author

Can we get this merged so we can rely on this condition?

@enxebre
Copy link
Member

enxebre commented Jun 19, 2024

The /errors package has its origin in when capi providers were machineActuators that needed to vendor core capi to function.
There's no usage recommendations and value is questionable since we moved to CRDs and conditions for interoperability between core and providers.
I think we should deprecate it and if there's any use case relying on it we should support it via conditions
I captured this here #10784

Would using a condition/reason be sufficient for your use case #10360 (comment)?

@vincepri
Copy link
Member

/hold
given the above

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2024
@enxebre enxebre mentioned this pull request Jul 18, 2024
72 tasks
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2024
@sbueringer
Copy link
Member

As we deprecated the entire package in #10784, we should not add new constants to it now

/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closed this PR.

In response to this:

As we deprecated the entire package in #10784, we should not add new constants to it now

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mcbenjemaa mcbenjemaa deleted the newmachine-error branch September 23, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/machine Issues or PRs related to machine lifecycle management cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants